//
//  BoZeDatePickerVC.swift
//  BoZeCalendar
//
//  Created by 李东 on 2024/4/12.
//

import UIKit

class BoZeDatePickerVC: UIViewController {
    
    @IBOutlet weak var datePicker: UIDatePicker!
    var selectCallBack:((Date) -> Void)?
    

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        view.backgroundColor = .black.withAlphaComponent(0.5)
        datePicker.maximumDate = Date()
    
    }

    @IBAction func cancelHandle(_ sender: Any) {
        dismiss(animated: true)
    }
    
    @IBAction func okHandle(_ sender: Any) {
        selectCallBack?(datePicker.date)
        dismiss(animated: true)
    }
    
}
